A publish-subscribe system contains information producers and information consumers. Information producers publish events to the system. Information consumers subscribe to particular categories of events within the system. The publish-subscribe system provides delivery of published events to those information consumers that subscribes to the event. In the publish-subscribe system, a producer of the message does not know where the message will be received and a consumer of the message does not know from where the message was sent.
One type of publish-subscribe system is subject-based. In the subject-based publish-subscribe system, each message belongs to one of a fixed set of subjects. Producers label each message with a subject and consumers subscribe to messages having a particular subject.
Another publish-subscribe system is a content-based messaging (CBM) system. CBM systems support a number of information spaces, where subscribers may express a “query” against the content of published messages.
Publish-subscribe systems are unreliable because it is not known whether a message was actually received by a consumer or not. If the message is resent because some subscribers have not received the message, the remaining subscribers will receive a duplicate message.